<?php

namespace tjsd\view\managers;

/**
 * 
 * 
 * @author Jakub Tesárek <info@tjsd.cz>
 * @copyright 2012
 * @version 1.0
 */
class SmartyViewContainer extends \tjsd\view\ViewContainerAdapter {
	protected $smarty;
	
	public function __construct(\Smarty $smarty) {
		$this->smarty = $smarty;
	}
	
	public function add($key, $value) {
		$this->smarty->assign($key, $value);
	}
	
	public function contain($key) {
		return isset($this->smarty->$key);
	}
	
	public function get($key) {
		return $this->smarty->$key;
	}
	
	public function remove($key) {
		$this->smarty->clearAssign($key);
	}
}